<?php

/*
 * allow the user to change their password
 * 
 */
if ( $_SESSION['logged_in'] == FALSE ) redirect (base_url ());

echo '<div id="contentfull">';
echo '<div id="forms">';
//print_r($roles);
//$name = $data[0]['Name'];
//$username = $data[0]['username'];
//var_dump($username);
//echo validation_errors('<div class="error">', '</div>'); 
//$attributes = array('class' => 'frmedit', 'width' => '600px', 'margin' => '0 auto');
$hidden = array('uid' => $uid);
echo '<a href="'.$baseurl.'index.php/users"><img src="'.$baseurl.'public/images/close.png" align="right" alt="close" title="Close" border="0" /></a>';
echo form_open($baseurl.'index.php/passchange', '',$hidden);
echo form_fieldset('<h2>   Change Password   </h2>');


?>
 
<table width="400px">
    <tr>
        <td width="150px" >
<?php   echo form_label('New Password *', 'pass'); 
        //echo form_error('Name'); 
        $passc = array('name' => 'pass', 
               'id' => 'pass',  
               'maxlength'   => '100',
               
              'style'       => 'width: 200px' ); ?>  </td>
        <td width="200px" ><?php echo form_input($passc); echo '<br>'.form_error('pass');?>       </td>
    </tr>
    <tr>
        <td width="150px" >
<?php   echo form_label('Confirm Password *', 'pass2'); 
        //echo form_error('Name'); 
        $pass2c = array('name' => 'pass2', 
               'id' => 'pass2',  
               'maxlength'   => '100',
               'style'       => 'width: 200px' ); ?>  </td>
        <td width="200px" ><?php echo form_input($pass2c); echo '<br>'.form_error('pass2');?>       </td>
    </tr>
    
    <tr>
        <td colspan="4" align="right" > <?php 
        echo form_submit('savepass', 'Change Password');?>  
    </tr>
</table>    
<?=form_fieldset_close()?>
<?=form_close();?>

</div> <!--content-->
</div> <!--login-->

